Computer Memory

The major hardware components of a computer system are:
  • Processor
  • Main memory
  • Secondary memory devices
  • Input/output devices
Bits and Bytes
Kilobytes, megabytes, gigabytes
Main memory
Secondary memory

Example:
If you bought a new computer, about how much main memory would you expect it to have: 256 bytes, 256 kilobytes, or 256 megabytes?
A new PC should have at least 256 megabytes, and more if possible. PCs have several gigabytes of main memory.

Main memory is as vital as the processor chip to a computer system. Fast computer systems have both a fast processor and a large, fast memory. Some characteristics are true for both kinds of memory; others are true for just one.

Characteristics
Very closely connected to the = True for Main Memory
processor.

Holds programs and data that the = True for Main Memory
processor is actively working with.

Used for long term storage. = True for Secondary Memory

The processor interacts with it = True for Main Memory
millions of times per second.

The contents is easily changed = True for both Main and Secondary Memory

Relatively huge capacity. = True for Secondary Memory

Fast access. = True for Main Memory

Slow access. = True for Secondary Memory

Connected to main memory. = True for Secondary Memory

Holds programs and data. = True for both Main and Secondary Memory

Usually its contents are organized = True for Secondary Memory
into files.

Byte
One bit of information is so little that usually computer memory is organized into groups of eight bits. Each eight bit group is called a byte. When more than eight bits are required for some data, a whole number of bytes are used. One byte is about enough memory to hold a single character.
Often very much more than eight bits are required for data, and thousands, millions, or even billions of bytes are needed.

Main Memory
Main memory consists of a very long list of bytes. In most modern computers, each byte has an address that is used to locate it. The picture shows a small part of main memory:
Each byte has an address.
The addresses for most computer memory start at 0 and go up in sequence until each byte has an address. Each byte contains a pattern of eight bits.
When the computer's power is on, every byte contains some pattern or other, even those bytes not being used for anything. The address of a byte is not part of its contents. When the processor needs to access the byte at a particular address, the electronics of the computer "knows how" to find that byte in memory.

Hard Drive
"Stores Files"
Hard disks (and other secondary memory devices) are used for long-term storage of large blocks of information, such as programs and data sets. Usually disk memory is organized into files.